<?php
class Model{
    public $db;
    public $model;

    function __construct($key=null){
        $this->db = new Dbtool();
        $filename = "model/".$key.".model.php";
        if(file_exists($filename)){
            require($filename);
            $modelClass = $key."_model";
            $model = new $modelClass();
            $this->model = $model;
        }
    }
}